<?php

defined('_JEXEC') or die();

jimport('joomla.application.component.view');

class Easiv2ViewManageInstances extends JView {
	
	function __construct() {
		parent::__construct();
	}
	
	function display($tpl = null) {
		$this->addToolbar();
		
		/**
		 * get data from model and assign to view
		 */
		$this->data = $this->get('InstanceInfo');
		
		parent::display($tpl);
	}
	
	function addToolbar() {
		JToolbarHelper::title(JText::_('COM_EASIV2_MANAGEINSTANCES_VIEW_TITLE'), 'checkin.png');
		JToolbarHelper::addNew('manageInstances.gotoAddExistingInstance', JText::_('COM_EASIV2_MANAGEINSTANCES_VIEW_BUTTON_ADD_INSTANCE'));
		JToolbarHelper::editListX('manageInstances.gotoEditInstances', JText::_('COM_EASIV2_MANAGEINSTANCES_VIEW_BUTTON_EDIT'));
		JToolBarHelper::custom('manageInstances.deleteInstances', 'cancel', 'cancel', JText::_('COM_EASIV2_MANAGEINSTANCES_VIEW_BUTTON_DELETE'), true);
		JToolbarHelper::divider();
		JToolBarHelper::custom('manageInstances.gotoExtensions', 'back', 'back', JText::_('COM_EASIV2_MANAGEINSTANCES_VIEW_BUTTON_GOTO_EXTENSIONMANAGEMENT'), false);
	}
}